<?php
/**
 * <https://y.st./>
 * Copyright © 2019 Alex Yst <mailto:copyright@y.st>
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <https://www.gnu.org./licenses/>.
**/

$xhtml = array(
	'<{title}>' => 'Huge salad recipe',
	'takedown' => '2017-11-01',
	'<{body}>' => <<<END
<img src="/img/CC_BY-SA_4.0/y.st./weblog/2019/05/27.jpg" alt="Red polish in the ring&apos;s gem hole" class="framed-centred-image" width="800" height="480"/>
<section id="diet">
	<h2>Dietary intake</h2>
	<p>
		For breakfast, I had 84 grams of cereal and 237 grams of soy milk.
		I made Aztec salad, the final recipe sent to me by my dietician, for dinner.
		I tried making it in my two-litre bowel, but it was too small.
		Man, this is a large recipe.
		I ended up needing to transfer it to my nine-point-five-litre tub.
		I&apos;m glad I had that.
		I wasn&apos;t sure I had a container large enough to finish the salad, but I happened to find that tub.
		I had 1044 grams of it for lunch.
		The salad wasn&apos;t as bad as I thought it&apos;d be, given that it had a couple bell peppers in it.
		Part of that was due to my changing the ingredient ratio a bit.
		For example, the recipe called for half a cup of diced onion.
		I don&apos;t use imperial volume measures when I prepare food, but metric measures, usually in weight.
		I&apos;d misread before and thought it called for half an onion, so I was planning to double the recipe (I didn&apos;t realise how large it already was) to use the whole onion and not have half of one left over.
		When I saw it was calling for some inexact fraction of the onion, I just threw the whole onion in and didn&apos;t double the other ingredients.
		That left me with more onion, and by ratio, less bell pepper.
		The recipe already had a lower ratio of bell pepper to not bell pepper than the fajitas too, so that helped the most.
		This salad is something I might actually make again, though it takes time, so I probably won&apos;t have it often.
		It&apos;s also doesn&apos;t seem that filling at first, so I went back for a second helping for lunch, but then I was stuffed.
		I&apos;d overeaten.
		It tastes okay on its own, but it gets really good if you add seasoning salt.
		I bet it&apos;d be even better with lemon dill seasoning.
		With the huge lunch, I ended up skipping dinner.
		I was just still stuffed at dinner time.
		I thought I&apos;d just go to bed without food, as I didn&apos;t think I&apos;d need it, but I ended up snacking on 231 grams of pretzels before bed.
		I should have gotten a small bowel of the salad, instead.
	</p>
</section>
<section id="drudgery">
	<h2>Drudgery</h2>
	<p>
		My discussion post for the day:
	</p>
	<blockquote>
		<p>
			Which side am I on?
			Neither, and at the same time, both.
			Do I prefer a hammer or a kitchen scale?
			Well, it depends on whether I&apos;m trying to hang my calendar on the wall or trying to cook dinner.
			I strongly believe that different approaches are better for different jobs.
		</p>
		<p>
			There are times when it&apos;s worth the extra space to store these materialised views because we need to be able to get answers from the database right away.
			For example, maybe we have a database of all the products a chain of department stores carry.
			One materialised view might store the results of a query across multiple tables that tells not only what products a given store carries, but where in the store they&apos;re located.
			A customer might come up to the service desk and ask where to find a product.
			The customer&apos;s not going to want to wait several minutes for an answer, so having a materialised view containing this specific store&apos;s products and locations in the store would be helpful.
			And if the given product isn&apos;t in the store, no location will be available, so not having to consult the master table of all items the chain carries isn&apos;t really necessary.
			And there are other times when we&apos;re working with limited storage and we don&apos;t mind waiting for results.
			There might not even be a person sitting there waiting, but instead, some report is being generated and saved to disk or printed.
			It might take hours before someone gets to the report, but several seconds or maybe even minutes before the query finishes.
			In this sort of situation, a materialised view isn&apos;t going to save us any time, and it&apos;d save us storage space not to have it.
		</p>
	</blockquote>
	<blockquote>
		<p>
			It really depends on what you&apos;re doing.
			What resources are available to you?
			What things are making use of those same resources?
			What have your bosses asked of you?
			Like you said, it&apos;s a trade-off between time and storage space.
			Which one do you have less of?
			Which one is more valuable to conserve?
			Without a specific situation in mind, the only answer is that it depends on the situation.
		</p>
	</blockquote>
	<blockquote>
		<p>
			You make an excellent point about this being a form of caching.
			I hadn&apos;t thought of it that way.
			I&apos;d seen it as redundant information, which while useful, still has a negative connotation when not able to be used to reconstruct the original data.
			Thinking of materialised views as a form of cache clears away the negativity.
			There&apos;s still a trade-off between which resources you&apos;d rather use though, so materialised views aren&apos;t a one-size-fits-all sort of tool.
		</p>
	</blockquote>
</section>
<section id="ring">
	<h2>Ring repair</h2>
	<p>
		I&apos;ve filled in the hole where the missing red gem used to be with red fingernail polish finally, as I&apos;d done previously with purple polish when the purple gem went missing.
		I don&apos;t recommend this ring to other people.
		It just doesn&apos;t hold up like it should.
		The gems keep falling out.
	</p>
</section>
<section id="queer">
	<h2>Another queer</h2>
	<p>
		I leaned today that one of my workmates is bisexual.
		They&apos;re a bit of an odd duck, though not in a bad way.
		I guess maybe I should have expected that they might be one of us queers?
		It seems to be widely accepted that queers are a bit quirky.
		And so far, all but one of the ones I&apos;ve had extended contact with certainly have fit that bill.
	</p>
	<p>
		Then again, there could be another explanation.
		I tend to get along with quirky people really well.
		They&apos;re more interesting than their more-normal counterparts.
		It could be that the people that have gotten comfortable enough around me to admit their queerness have been those that are quirky.
		Or it could even just be that because I talk to these people more, there are more opportunities for it to come up.
	</p>
</section>
END
);
